package com.itheima.mymap;

import java.util.HashMap;
import java.util.Map;

public class MapDemo1 {
    public static void main(String[] args) {
        Map<String,String> map = new HashMap<>();
        map.put("郭靖","黄蓉");
        map.put("杨过","小龙女");
        map.put("张无忌","周芷若");
        System.out.println(map);
        System.out.println("------------------------");

        map.put("张无忌","赵敏");
        System.out.println(map);
        System.out.println("------------------------");

        map.remove("杨过");
        System.out.println(map);
        System.out.println("------------------------");

        boolean z = map.containsKey("张无忌");
        System.out.println(z);
        System.out.println("------------------------");

        boolean y = map.containsKey("尹志平");
        System.out.println(y);
        System.out.println("------------------------");

    }
}
